    package com.common.retrofit.methods;

import com.common.retrofit.base.BaseMethods;
import com.common.retrofit.entity.bean.SortBean;
import com.common.retrofit.service.HaiNingService;

import rx.Observable;
import rx.Subscriber;

public class MakeBillMethods extends BaseMethods {

    private static MakeBillMethods m_ins = null;

    public static MakeBillMethods getInstance() {
        if (m_ins == null) {
            synchronized (MakeBillMethods.class) {
                if (m_ins == null) {
                    m_ins = new MakeBillMethods();
                }
            }
        }
        return m_ins;
    }

    @Override
    protected String getHttpUrl() {
        return "My/";
    }

    private HaiNingService initService() {
        return getRetrofit().create(HaiNingService.class);
    }


    public void bill(Subscriber<Object> subscriber,int uid,String hashid ,String orderids ,int type ,String name ,String number ,String reg_address,String reg_mobile,String bank_name,String bank_num ) {
        Observable observable = initService().bill(System.currentTimeMillis()+"",
                "6fb5f0b61db3eecfd3619a3cb9516a64",uid,hashid,orderids,type,name,number,reg_address,reg_mobile,bank_name,bank_num
        );
        toSubscribe(observable, subscriber);
    }
}
